var mongoose=require('mongoose');
var User=require('./user');
var Book=require('./book');
var favoriteSchema = new mongoose.Schema({
    user_id:{
        type:mongoose.Schema.ObjectId,
        ref:'User'
    },
    userName:String,
    sku:{
        type:String,
        ref:'Book'
    },
    bookTitle:String,
    time:Date
});

module.exports=mongoose.model('Favorite',favoriteSchema);